//
// Created by Castle on 2025/10/28.
//

#include <iostream>
using namespace std;

int main() {
    // 判断大写字母在字母表中是第几个字母
    char ch;
    cin >> ch;
    int index = ch - 'A' + 1;
    cout << index << endl;

    return 0;
}